package com.kunpu.framework.security.old;

import java.util.HashMap;
import java.util.Map;

public class TestClass {
    public static final String key = "ae59ced3102c9d48bfdc0e4d4146ce03";
	public static void main(String[] args) {
		test1();
		//testBindCar();
		//test();
		//testApi();
	}
	
	public static void test1(){
		Map map = new HashMap();
		map.put("aaaa", "11111");
		map.put("bbbb", "22222");
		map.put("cccc", "33333");
		System.out.println(map);
	}
	public static void testApi(){
		String encrpt = CipherOldApi.encrypt(key, "622334rere343101abcdef");
		System.out.println("密文=:"+encrpt);
		String decrypt = CipherOldApi.decrypt(key, encrpt);
		System.out.println("原文=:"+decrypt);
		
	}
	public static void test(){
   	 String accNo = "622334343101";
   	 byte[] keyBystes = Encodes.decodeHex(key);
   	 byte[] bytes2 = Cryptos.aesEncrypt(accNo.getBytes(), keyBystes);
   	 String encrpt = Encodes.encodeHex(bytes2);
   	 System.out.println("====加密密文=:"+encrpt);
   	 
   	 byte[] dinput = Encodes.decodeHex(encrpt);
   	 String dString = Cryptos.aesDecrypt(dinput, keyBystes);
   	 System.out.println("====解密后的文件=:"+dString);
   	
   }
   public static void testBindCar(){
   	 byte[] keyBystes = Encodes.decodeHex(key);
   	 String str ="b8ce03c03b89480b62e8b5a657bd6a47c2e8329663656d21118da104d22f9779";
   	 byte[] dinput = Encodes.decodeHex(str);
   	 String dString = Cryptos.aesDecrypt(dinput, keyBystes);
   	 System.out.println("====解密后的文件=:"+dString);
   }
}
